<?php

/**
 * Flickr Photosets - Flickr Authentication Page
 * Authenticates the user's Flickr account and adds it to the database.
 * 
 * @author Brad Dougherty <bdougherty@gmail.com>
 * @version 8.1.10
 * @license http://www.gnu.org/licenses/gpl.html GNU General Public License 3.0
 */

/*
Require the function library
This will include all other necessary files
*/
require_once 'lib.php';

// This was included in the phpFlickr sample, so I put it in
unset($_SESSION['phpFlickr_auth_token']);

/*
Initialize Flickr Photosets
*/
$fp = new FP_Auth();

// Display Flickr revoke permissions page
$token = $fp->config['flickr_token'];
$token = substr($token, 0, strpos($token, '-'));

/*
Create a canvas page with an iframe.
This will allow the user to remove the Flickr authorization if they want.
*/
?>

<fb:header decoration="add_border">Revoke Permissions</fb:header>

<div style="padding:15px 45px 15px;">
	<h3>If you wish, you may revoke the permissions for <?=$fp->application_name?> on Flickr.</h3>
	<p>It is recommended that you revoke the permissions if you are going to remove <?=$fp->application_name?>. When you are finished, click the Continue link below. If you do not wish to revoke the permissions, you can just click Continue.</p>
</div>

<fb:iframe src="http://www.flickr.com/services/auth/revoke.gne?token=<?=$token?>" style="border:1px solid #d8dfea;width:100%;height:325px;" scrolling="no" />

<div style="padding:20px 45px;text-align:right;">
	<h3><a href="<?=$fp->canvas_url?>/configure.php">Continue</a></h3>
</div>